"""
@author: ZY
@Time: 2021/10/07
"""

import requests

from conf import env


class SwaggerApi:
    """获取SwaggerApi上json数据
    """
    def swagger(self):
        response = requests.get(env.SWAGGER_URL)
        return eval(response.text.replace("true", "True").replace("false", "False"))


SwaggerApi = SwaggerApi()

if __name__ == '__main__':
    A = SwaggerApi.swagger()
    print(type(A))
    print(A['paths'])
